home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / Papers / OS Shell in Java / Facade / DesktopMenuItem.java < prev    next >
Encoding:
Java Source  |  1998-06-17  |  1014 b   |  48 lines  |  [TEXT/dosa]

  1. //    DesktopMenuItem.java : this is a Java source code file for the program Facade.
  2. //    Copyright 1998, Andrew S. Downs
  3. //    andrew.downs@tulane.edu
  4. //
  5. //    This source code is distributed as freeware.
  6. //    Just keep this author information in the file.  Enjoy!
  7.  
  8. import java.awt.*;
  9. import java.io.*;
  10. import java.util.*;
  11.  
  12. public class DesktopMenuItem extends DesktopComponent implements Serializable {
  13.     // Determines if item is selectable
  14.     boolean enabled = false;
  15.     
  16.     // Grid coords for displaying label
  17.     Point drawPoint = new Point();
  18.     
  19.     DesktopMenuItem() {
  20.         super();
  21.     }
  22.     
  23.     DesktopMenuItem( String s ) {
  24.         super();
  25.         this.setLabel( s );
  26.     }
  27.     
  28.     public void setDrawPoint( int x, int y ) {
  29.         this.drawPoint = new Point( x, y );
  30.     }
  31.  
  32.     public void setDrawPoint( Point p ) {
  33.         this.drawPoint = p;
  34.     }
  35.  
  36.     public Point getDrawPoint() {
  37.         return this.drawPoint;
  38.     }
  39.  
  40.     public void setEnabled( boolean b ) {
  41.         this.enabled = b;
  42.     }
  43.  
  44.     public boolean getEnabled() {
  45.         return this.enabled;
  46.     }
  47. }
  48.